"use strict";

exports.__esModule = true;
exports.default = shadowProperty;

var _akutils = require("akutils");

/**
	Function used by shaders to instantiate shadow implementation classes, subclasses of ShadowImpl.

	@ignore
*/
function shadowProperty(time, ImplClass, property, name, state, parent, shader) {
	var impl = new ImplClass(time, property, name, state, parent, shader);

	// set the current implementation
	property.setImpl(impl);

	// invoke will shadow life-cycle method
	property.onPropertyWillShadow();

	impl.setupPropertyAccess();

	return impl;
}