UNPKG

@polygonjs/polygonjs

Version:

node-based WebGL 3D engine https://polygonjs.com

54 lines (53 loc) 1.41 kB
"use strict"; import { NamedFunction0 } from "./_Base"; class GlobalsTimeFunction0 extends NamedFunction0 { constructor(node, shadersCollectionController) { super(node, shadersCollectionController); } } class PointerEventsTimeFunction0 extends NamedFunction0 { constructor(node, shadersCollectionController) { super(node, shadersCollectionController); this.pointerEventsController = node.scene().eventsDispatcher.pointerEventsController; } } export class globalsTime extends GlobalsTimeFunction0 { static type() { return "globalsTime"; } func() { return this.timeController.timeUniform().value; } } export class globalsTimeDelta extends GlobalsTimeFunction0 { static type() { return "globalsTimeDelta"; } func() { return this.timeController.timeDeltaUniform().value; } } export class globalsRaycaster extends PointerEventsTimeFunction0 { static type() { return "globalsRaycaster"; } func() { return this.pointerEventsController.raycaster().value; } } export class globalsRayFromCursor extends PointerEventsTimeFunction0 { static type() { return "globalsRayFromCursor"; } func() { return this.pointerEventsController.raycaster().value.ray; } } export class globalsCursor extends PointerEventsTimeFunction0 { static type() { return "globalsCursor"; } func() { return this.pointerEventsController.cursor().value; } }