Skip to content

Commit 43c5e2a

Browse files
authored
Merge branch 'main' into texture-array-updates
2 parents 50cbd9b + 18aee53 commit 43c5e2a

File tree

290 files changed

+3423
-3508
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

290 files changed

+3423
-3508
lines changed

examples/src/examples/graphics/integer-textures.example.mjs

+1
Original file line numberDiff line numberDiff line change
@@ -232,6 +232,7 @@ assetListLoader.load(() => {
232232
const gameScreenMaterial = gameScreen.render.material;
233233
gameScreenMaterial.diffuse = pc.Color.BLACK;
234234
gameScreenMaterial.emissiveMap = outputTexture;
235+
gameScreenMaterial.emissive = pc.Color.WHITE;
235236
gameScreenMaterial.useLighting = false;
236237
gameScreenMaterial.update();
237238
app.root.addChild(gameScreen);

examples/src/examples/graphics/mesh-decals.example.mjs

+1
Original file line numberDiff line numberDiff line change
@@ -200,6 +200,7 @@ assetListLoader.load(() => {
200200
material.blendType = pc.BLEND_ADDITIVEALPHA; // additive alpha blend
201201
material.depthWrite = false; // optimization - no need to write to depth buffer, as decals are part of the ground plane
202202
material.emissiveMap = assets.heart.resource;
203+
material.emissive = pc.Color.WHITE;
203204
material.opacityMap = assets.heart.resource;
204205
material.depthBias = -0.1; // depth biases to avoid z-fighting with ground plane
205206
material.slopeDepthBias = -0.1;

examples/src/examples/graphics/painter.example.mjs

+3-2
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ app.on('destroy', () => {
5454
*/
5555
function createPrimitive(primitiveType, position, scale, layer, material) {
5656
// create primitive
57-
const primitive = new pc.Entity();
57+
const primitive = new pc.Entity(`Brush-${primitiveType}`);
5858
primitive.addComponent('render', {
5959
type: primitiveType,
6060
layers: layer,
@@ -91,7 +91,6 @@ app.scene.layers.insert(paintLayer, 0);
9191

9292
// create a material we use for the paint brush - it uses emissive color to control its color, which is assigned later
9393
const brushMaterial = new pc.StandardMaterial();
94-
brushMaterial.emissiveTint = true;
9594
brushMaterial.useLighting = false;
9695
brushMaterial.update();
9796

@@ -141,7 +140,9 @@ app.root.addChild(camera);
141140

142141
// material used to add render target into the world
143142
const material = new pc.StandardMaterial();
143+
material.name = 'EmissiveMaterial';
144144
material.emissiveMap = texture;
145+
material.emissive = pc.Color.WHITE;
145146
material.useLighting = false;
146147
material.update();
147148

examples/src/examples/graphics/reflection-box.example.mjs

+1
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,7 @@ assetListLoader.load(() => {
162162
const screenMaterial = new pc.StandardMaterial();
163163
screenMaterial.useLighting = false;
164164
screenMaterial.emissiveMap = videoTexture;
165+
screenMaterial.emissive = pc.Color.WHITE;
165166
screenMaterial.update();
166167

167168
/**

examples/src/examples/graphics/render-to-texture.example.mjs

+2
Original file line numberDiff line numberDiff line change
@@ -247,9 +247,11 @@ assetListLoader.load(() => {
247247
tv.setLocalEulerAngles(90, 0, 0);
248248
tv.render.castShadows = false;
249249
tv.render.receiveShadows = false;
250+
250251
/** @type {pc.StandardMaterial} */
251252
const material = tv.render.material;
252253
material.emissiveMap = texture; // assign the rendered texture as an emissive texture
254+
material.emissive = pc.Color.WHITE;
253255
material.update();
254256

255257
// setup skydome, use top mipmap level of cubemap (full resolution)

examples/src/examples/graphics/texture-basis.example.mjs

-1
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,6 @@ assetListLoader.load(() => {
7878
// Construct material
7979
const material = new pc.StandardMaterial();
8080
material.useMetalness = true;
81-
material.diffuse = new pc.Color(0.3, 0.3, 0.3);
8281
material.gloss = 0.8;
8382
material.metalness = 0.7;
8483
material.diffuseMap = assets.color.resource;

examples/src/examples/graphics/video-texture.example.mjs

+1
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,7 @@ assetListLoader.load(() => {
114114
const material = new pc.StandardMaterial();
115115
material.useLighting = false;
116116
material.emissiveMap = videoTexture;
117+
material.emissive = pc.Color.WHITE;
117118
material.update();
118119

119120
// set the material on the screen mesh

package-lock.json

+87-60
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+5-4
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,9 @@
7777
"error",
7878
{
7979
"definedTags": [
80+
"attribute",
8081
"category",
81-
"attribute"
82+
"import"
8283
]
8384
}
8485
]
@@ -132,9 +133,9 @@
132133
"rollup-plugin-visualizer": "^5.12.0",
133134
"serve": "^14.2.2",
134135
"sinon": "^17.0.1",
135-
"typedoc": "^0.25.13",
136-
"typedoc-plugin-mdn-links": "^3.1.22",
137-
"typescript": "^5.4.5",
136+
"typedoc": "^0.26.3",
137+
"typedoc-plugin-mdn-links": "^3.2.2",
138+
"typescript": "^5.5.3",
138139
"xhr2": "^0.2.1"
139140
},
140141
"scripts": {

0 commit comments

Comments
 (0)