Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions examples/3d-light-playground/3d-light-playground.json
Original file line number Diff line number Diff line change
Expand Up @@ -4317,6 +4317,17 @@
" * @param sortDistance {number} The squared distance to the camera.",
" */",
" insertByDistance(object, sortDistance) {",
" // A render can happen without a game step in between (the editor",
" // and the gameplay test harness render a paused game), so a light",
" // can be offered again before the lists were cleared. Keep it once,",
" // or the duplicates would evict the other lights - but apply its",
" // state again, as the renderer reset it before offering the light.",
" for (const pair of this.objects) {",
" if (pair.object === object) {",
" this.onInsertion(object);",
" return;",
" }",
" }",
" let insertionIndex = 0;",
" for (let index = this.objects.length - 1; index >= 0; index--) {",
" if (sortDistance >= this.objects[index].sortDistance) {",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18532,6 +18532,17 @@
" * @param sortDistance {number} The squared distance to the camera.",
" */",
" insertByDistance(object, sortDistance) {",
" // A render can happen without a game step in between (the editor",
" // and the gameplay test harness render a paused game), so a light",
" // can be offered again before the lists were cleared. Keep it once,",
" // or the duplicates would evict the other lights - but apply its",
" // state again, as the renderer reset it before offering the light.",
" for (const pair of this.objects) {",
" if (pair.object === object) {",
" this.onInsertion(object);",
" return;",
" }",
" }",
" let insertionIndex = 0;",
" for (let index = this.objects.length - 1; index >= 0; index--) {",
" if (sortDistance >= this.objects[index].sortDistance) {",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41557,6 +41557,17 @@
" * @param sortDistance {number} The squared distance to the camera.",
" */",
" insertByDistance(object, sortDistance) {",
" // A render can happen without a game step in between (the editor",
" // and the gameplay test harness render a paused game), so a light",
" // can be offered again before the lists were cleared. Keep it once,",
" // or the duplicates would evict the other lights - but apply its",
" // state again, as the renderer reset it before offering the light.",
" for (const pair of this.objects) {",
" if (pair.object === object) {",
" this.onInsertion(object);",
" return;",
" }",
" }",
" let insertionIndex = 0;",
" for (let index = this.objects.length - 1; index >= 0; index--) {",
" if (sortDistance >= this.objects[index].sortDistance) {",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10853,6 +10853,17 @@
" * @param sortDistance {number} The squared distance to the camera.",
" */",
" insertByDistance(object, sortDistance) {",
" // A render can happen without a game step in between (the editor",
" // and the gameplay test harness render a paused game), so a light",
" // can be offered again before the lists were cleared. Keep it once,",
" // or the duplicates would evict the other lights - but apply its",
" // state again, as the renderer reset it before offering the light.",
" for (const pair of this.objects) {",
" if (pair.object === object) {",
" this.onInsertion(object);",
" return;",
" }",
" }",
" let insertionIndex = 0;",
" for (let index = this.objects.length - 1; index >= 0; index--) {",
" if (sortDistance >= this.objects[index].sortDistance) {",
Expand Down
Loading