MCPcopy Create free account
hub / github.com/DjDeveloperr/deno_desktop / Vector3

Class Vector3

examples/extern/gmath.bundle.js:256–446  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

254const matrix4add = instance.exports.matrix4add;
255const matrix4sub = instance.exports.matrix4sub;
256class Vector3 {
257 #internal = new Float32Array(3);
258 get [0]() {
259 return this.#internal[0];
260 }
261 set [0](val) {
262 this.#internal[0] = val;
263 }
264 get [1]() {
265 return this.#internal[1];
266 }
267 set [1](val) {
268 this.#internal[1] = val;
269 }
270 get [2]() {
271 return this.#internal[2];
272 }
273 set [2](val) {
274 this.#internal[2] = val;
275 }
276 get x() {
277 return this.#internal[0];
278 }
279 set x(val) {
280 this.#internal[0] = val;
281 }
282 get y() {
283 return this.#internal[1];
284 }
285 set y(val) {
286 this.#internal[1] = val;
287 }
288 get z() {
289 return this.#internal[2];
290 }
291 set z(val) {
292 this.#internal[2] = val;
293 }
294 static negativeInfinity() {
295 return new Vector3(Number.NEGATIVE_INFINITY);
296 }
297 static positiveInfinity() {
298 return new Vector3(Number.POSITIVE_INFINITY);
299 }
300 static zero() {
301 return new Vector3(0);
302 }
303 static one() {
304 return new Vector3(1);
305 }
306 static up() {
307 return new Vector3(0, 1, 0);
308 }
309 static down() {
310 return new Vector3(0, -1, 0);
311 }
312 static left() {
313 return new Vector3(-1, 0, 0);

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected